package zdsmj;

public class Goods{

    private int id;
    private String name;
    private int price;
    private int num;

    public int getJifen() {
        return jifen;
    }

    public void setJifen(int jifen) {
        this.jifen = jifen;
    }

    private int jifen;
    public Goods(){}
    public Goods(int id,String name,int price,int num,int jifen){
        this.id=id;
        this.name=name;
        this.price=price;
        this.num=num;
        this.jifen=jifen;


    }

    @Override
    public String toString() {
        return getId()+"."+getName()+"(人民币"+getPrice()+"元,会员积分"+getJifen()+")"+"数量："+getNum();
    }
    //getter 与 setter



    public int getId() {
        return id;
    }

    public void setId(int id) {
        this.id = id;
    }

    public String getName() {
        return name;
    }

    public void setName(String name) {
        this.name = name;
    }

    public int getPrice() {
        return price;
    }

    public void setPrice(int price) {
        this.price = price;
    }

    public int getNum() {
        return num;
    }

    public void setNum(int num) {
        this.num = num;
    }
}
